package cn.wfu.rlrjds.repairman;

import org.junit.Test;

import cn.wfu.rlrjds.jersey.api.IMUserAPI;
import cn.wfu.rlrjds.jersey.comm.ClientContext;
import cn.wfu.rlrjds.jersey.comm.EasemobRestAPIFactory;
import cn.wfu.rlrjds.jersey.comm.body.IMUserBody;

/**
 * 创建环信管理员 * @author MGL
 * 
 */
public class CreateIMUserRepaire {
	@Test
	public void createIMUserRepaire() {
		EasemobRestAPIFactory factory = ClientContext.getInstance()
				.init(ClientContext.INIT_FROM_PROPERTIES).getAPIFactory();

		IMUserAPI user = (IMUserAPI) factory
				.newInstance(EasemobRestAPIFactory.USER_CLASS);
		for (int i = 1; i < 4; i++) {
			IMUserBody userBody = new IMUserBody("admin" + i, "admin", "admin");
			user.createNewIMUserSingle(userBody);
		}
	}
}
